/**********************************************
*  Classes:   Light
*  Desc:      Defines an light in the scene. 
*  Author:    Vaios Kalpias-Ilias (C) 2008-2009
***********************************************/

#include "Light.h"

//--------------------------------------------------------
unsigned int Light::m_uiGlobalId = 0;
//--------------------------------------------------------
/**
* Ctor
*/
Light::Light(LightType type)
: m_eType(type), 
  m_bOn(true),
  m_uiId(m_uiGlobalId)
{
	m_uiGlobalId++;
}
//--------------------------------------------------------
/**
* Dtor
*/
Light::~Light()
{
}
//--------------------------------------------------------
/**
* Gets distance from a certain position
*/
float Light::GetDistanceFrom(const mth::Vector3& pos) const
{
	return (pos - m_vPos).Length();
}